Conversation
Summary of ChangesHello @luyi256, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a resource consumption issue in the task scheduler where unfinished tasks would continue to occupy resources even after a batch had met its minimum completion requirements and a grace period. By introducing a dedicated cleanup mechanism, the changes ensure that these lingering tasks are properly terminated and their associated runners are reset, leading to more efficient resource utilization and preventing potential resource leaks. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the logic for cleaning up unfinished tasks in over_rollout scenarios. A new method _cleanup_batch_and_restart_runners is introduced to encapsulate the cleanup logic, which is now called when a batch times out or when the over_rollout condition is met after reaching the minimum number of completed tasks. This fixes an issue where unfinished tasks would continue to consume resources.
My review focuses on improving the robustness of the new cleanup method by handling potential exceptions during runner restarts and ensuring the asynchronous calls are correctly awaited. I've also suggested a minor performance improvement in the get_results method.
|
/unittest-module-common |
Summary
Skipped
Tests
Github Test Reporter by CTRF 💚 |
|
/unittest-module-explorer |
Summary
Tests
Github Test Reporter by CTRF 💚 |
…led; fix schedule: wait for cleanup if timeout and enabling clear (also for over_rollout)
|
/unittest-module-explorer |
Summary
Tests
Github Test Reporter by CTRF 💚 |
Description
Fix over_rollout: clear all the unfinished tasks after finishing the min_num tasks, instead of ignoring these tasks, which will consume resources until they are finished.
Checklist
Please check the following items before code is ready to be reviewed.